<?php
/**
 * Created by PhpStorm.
 * User: peter
 * Date: 2018/6/19
 * Time: 7:46 PM
 */

namespace app\mall\controller;


use think\Request;

class Area extends Base
{
    /**
     * @purpose 通过pid获取区域列表
     * @param Request $request
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function list (Request $request)
    {
        $pid = $request->get('pid', 0);
        return \app\mall\logic\Area::areaByPid($pid);
    }
}